module table_param
  use derived,only:SimulatedObject
  use derived,only:EventTable
  use derived,only:EventProfileTable
  implicit none

  ! Table for simulated objects
  type(SimulatedObject),pointer,dimension(:) :: sim_obj
  integer :: default_alloc_sim_obj
  integer :: add_alloc_sim_obj
  integer :: total_alloc_sim_obj
  integer :: n_sim_obj

  ! Deleted simulated object
  integer,pointer,dimension(:) :: del_sim_obj
  ! default_alloc_del_sim_obj=default_alloc_sim_obj
  ! add_alloc_del_sim_obj=add_alloc_sim_obj
  ! total_alloc_del_sim_obj=total_alloc_sim_obj
  integer :: n_del_sim_obj
  
  ! Event table
  type(EventTable),pointer,dimension(:) :: event_table
  integer :: default_alloc_event_table
  integer :: add_alloc_event_table
  integer :: total_alloc_event_table
  integer :: n_event_table

  ! Deleted event table
  integer,pointer,dimension(:) :: del_event_table
  ! default_alloc_del_event_table=default_alloc_event_table
  ! add_alloc_del_event_table=add_alloc_event_table
  ! total_alloc_del_event_tabl=total_alloc_event_table
  integer :: n_del_event_table

  ! Event table in simulated object
  integer :: alloc_event_n_in_sim_obj

  ! Spontaneous event table
  integer,pointer,dimension(:) :: spont_event_table
  ! default_alloc_spont_event_table=default_alloc_event_table
  ! add_alloc_spont_event_table=add_alloc_event_table
  ! total_alloc_spont_event_table=total_alloc_event_table
  integer :: n_spont_event_table

  ! Deleted Spontaneous event table

  ! Profile table
  type(EventProfileTable),pointer,dimension(:) :: event_profile
  integer :: default_alloc_event_profile
  integer :: add_alloc_event_profile
  integer :: total_alloc_event_profile
  integer :: n_event_profile

  ! Event table
  integer :: alloc_event_n_in_profile

end module table_param
